package com.bruce.demo1.principles.demo2.lsp.demo1;

/**
 * @PROJECT_NAME design_patterns
 * @DESCRIPTION 测试类
 * @AUTHOR CNBruceLee
 * @DATE 2021/6/21 20:52
 */
public class Test {

    public static void main(String[] args) {
        Rectangle rectangle = new Rectangle();
        rectangle.setLength(10);
        rectangle.setWidth(20);
        RectangleResize.resize(rectangle);
        RectangleResize.printLengthAndWidth(rectangle);

        System.out.println("==============================");

        Rectangle square = new Square();
        rectangle.setLength(10);
        RectangleResize.resize(square);
        RectangleResize.printLengthAndWidth(square);
    }
}
